<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript">
	
	window.onload = function(){
		var ask_date = document.getElementById('ask_date').value;
		var ask_time = document.getElementById('ask_time').value;
		var branch_num = document.getElementById('branch_num').value;
		var branch_name = '^^';
		if(branch_num == 1){
			branch_name = '강남점';
		} else if(branch_num ==2){
			branch_name = '여의도점';
		}
		var seminar_num = document.getElementById('seminar_num').value;
		if(branch_num ==2){
			seminar_num = seminar_num -3;
		}
		
		alert('예약이 완료되었습니다.\n장소 : '+branch_name+' NO.'+seminar_num+'\n시간 : '+ask_date+' '+ask_time+'에 예약되었습니다.\n\n자세한 내용은 마이페이지>>예약내역을 확인해주시기 바랍니다.');
		
		document.getElementById('goDetail').submit();
	};
</script>
</head>
<body>
	<input type="hidden" id="ask_date" value="${reservation.ask_date}">
	<input type="hidden" id="ask_time" value="${reservation.ask_time}">
	<input type="hidden" id="branch_num" value="${reservation.branch_num}">
	<input type="hidden" id="seminar_num" value="${reservation.seminar_num}">
	
	<form id="goDetail" method="POST" action="detail.do">
		<input type="hidden" name="email" value="${email}">
	</form>
</body>
</html>